/**
 Copyright will be fixed soon.
 Author: Hiroshi Ota.
 $Date: $
 $Revision: $
*/

#include "Battery.h"

#ifndef _BRICKOS_

Battery* Battery::instance=0;

Battery::Battery(ISimulatorControl* sc)
: simCon(sc)
{
}

void Battery::initialize(ISimulatorControl* sc)
{
	instance = new Battery(sc);
}
void Battery::terminate()
{
	if (instance!=0)
	{
		delete instance;
	}
}


int Battery::get()
{
	int result = -1;
	if (instance!=0){
		result = instance->simCon->getBatteryValue();
	}
    return result;
}

#endif  // _BRICKOS_
